package es.index.logs.parse.squid;

import java.util.Date;

import es.index.document.logs.squid.SquidAccessLog;
import es.index.logs.parse.LogsBaseParse;

public class SquidAccessLogsParse extends LogsBaseParse {

	public SquidAccessLogsParse() {
		super();
		String keys = "set_date,set_responseTime,set_ip,"
				+ "set_resultsStatusCode,set_transmittedSize,set_method,set_uri,"
				+ "set_clientIdentity,set_peerCodingHost,set_contentType,"
				+ "set_requestHeader,set_responseHeader";
		
		_keys = keys.split(",");
	}

	@Override
	protected Object getLogs() {
		SquidAccessLog log = new SquidAccessLog();
		log.set_id(ID());
		log.set_fileName(_fileName);

		setClassValue(log, 0, null, null);

		return log;
	}

	@Override
	protected Date getDate() {
		return getNumDate();
	}

	@Override
	protected void initParseParamete() {
		initParseParamete(SquidAccessLog.class);
	}
}
